<?php 
header("Content-type: text/html; charset=utf-8");

/**
 * [D description]
 * @Author   Xuebingsi
 * @DateTime 2017-09-07T09:07:26+0800
 */
function D()
{
	echo "这个是我自己封装的函数";
}

/**
 * [Ftime 日期格式化函数]
 * @Author   Xuebingsi
 * @DateTime 2017-09-07T08:50:28+0800
 * @param    [int]                   $time [时间戳]
 */
function Ftime($time)
{
	$diff = time()-$time;

	if($diff<60){
		return "刚刚";
	}elseif($diff<3600){
		return floor($diff/60)."分钟前";
	}elseif($diff<86400){
		return floor($diff/3600)."小时前";
	}elseif($diff<(86400*7)){
		return floor($diff/86400)."天前";
	}else{
		return date("Y-m-d H:i:s",$time);
	}
}














 ?>